//
//  UIConstants.h
//  AppFrameWork
//
//  Created by Le Anh Tai on 7/21/13.
//  Copyright (c) 2013 Le Anh Tai. All rights reserved.
//

#define RECT(__x__,__y__,__w__,__h__) CGRectIntegral(CGRectMake(__x__,__y__,__w__,__h__))

#define DEFAULT_ANIMATION_VECLOCITY 1400
#define DEFAULT_SLOWEST_SPEED_TIME 0.4

#define DEFAULT_GENGER_MALE YES

#define SCREEN_SIZE [UIScreen mainScreen].bounds.size //point

//Font
#define FONT_HELVETICANEUE(__x__)           [UIFont fontWithName:@"HelveticaNeue" size:__x__]
#define FONT_HELVETICANEUE_BOLD(__x__)      [UIFont fontWithName:@"HelveticaNeue-Bold" size:__x__]
#define FONT_HELVETICANEUE_ITALIC(__x__)    [UIFont fontWithName:@"HelveticaNeue-Italic" size:__x__]

#define FONT_SIZE_HEADER_RESULT 17

#define TEXT_TITLE_GOLD_PRICE @"GIÁ VÀNG"
#define TEXT_SOURCE_GOLD_PRICE @"(Nguồn SJC)"
#define TEXT_TITLE_EXCHANGE_RATE @"TỶ GIÁ"
#define TEXT_SOURCE_EXCHANGE_RATE @"(Nguồn Vietcombank)"
#define TEXT_CALLOUT_FORMAT_BEFORE @"Trước đó %@"
#define TEXT_CALLOUT_FORMAT_NOW @"Hiện tại %@"
#define TEXT_CALLOUT_FORMAT_NON_BEFORE @"Trước đó chưa có"

//
#define IS_IPHONE (([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone))

#define SYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame)
#define SYSTEM_VERSION_GREATER_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending)
#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending)
#define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending)
#define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending)
#define IS_SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_IOS7 SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"7.0")

//
#define Is_Landscape (([[UIApplication sharedApplication] statusBarOrientation]) == UIInterfaceOrientationLandscapeLeft || ([[UIApplication sharedApplication] statusBarOrientation]) == UIInterfaceOrientationLandscapeRight)

//Color
#define COLOR(__r__,__g__,__b__,__a__)    [UIColor colorWithRed:__r__*1.0/255.0 green:__g__*1.0/255.0 blue:__b__*1.0/255.0 alpha:__a__*1.0]
#define CALLOUTVIEW_BACKGROUND_COLOR COLOR(0, 0, 0, 0.7)
#define CALLOUTVIEW_BORDER_COLOR COLOR(161, 167, 167, 1)


//black style
#define COLOR_PINK COLOR(228, 99, 149, 1)
#define COLOR_BLACK_PURE COLOR(2,2,2,1)
#define COLOR_BLACK COLOR(79,79,79,1)
#define COLOR_LIGHT_BLACK COLOR(41,41,41,1)
#define COLOR_ORANGE COLOR(246,197,70,1)
#define COLOR_DARK_ORANGE COLOR(202,141,19,1)
#define COLOR_WHITE COLOR(240,240,240,1)
#define COLOR_LIGHT_GRAY COLOR(231,231,231,1)
#define COLOR_TEXT_LIGHT_GRAY COLOR(158,158,158,1)
#define COLOR_BLUE_IOS7 COLOR(0,105,245,1)
#define COLOR_RED COLOR(229,0,0,1)
#define COLOR_GREEN COLOR(1,212,5,1)